import Vue from "vue";
import Router from "vue-router";

Vue.use(Router)

const router = new Router({
    routes: [
        // 购物车，登录，首页，注册的配置加上
        {
            path: "/",
            redirect: "/home"
        },
        {
            // 主页 许妮
            path: "/home",
            component: () => import("../components/xn/page/HomePage.vue")
        },
        {
            // 购物车 
            path: "/cart",
            // component: () => import("../components/hf/page/CartPage.vue")
            component: () => import("../components/xn/HomeCom/Cart/Cart.vue")
        },
        {
            // 购物车我的地址
            path: "/myAddress",
            component: () => import("../components/xn/HomeCom/Address/MyAddress.vue")
        },
        {
            // 购物车我的地址添加
            path: "/newAddress",
            component: () => import("../components/xn/HomeCom/Address/NewAddress.vue")
        },
        {
            // 分类
            path: "/classify",
            component: () => import("../components/xn/HomeCom/Classify.vue")
        },
        {
            // 订单详情
            path: "/order",
            component: () => import("../components/xn/HomeCom/Order.vue")
        },
        // 商品详情
        {
            path: "/detail",
            component: () => import("../components/xn/HomeCom/Detail.vue")

        },
        {
            path: "/payMoney",
            component: () => import("../components/xn/HomeCom/PayMoney.vue")
        },
        {
            path: "/searchDetail",
            component: resolve => require(["../components/xn/HomeCom/Search/SearchDetail.vue"], resolve)
        },
        {
            // 打开App 黄帆
            path: "/open",
            component: () => import("../components/hf/page/OpenApp.vue")
        },

        {
            // 我的
            path: "/my",
            component: () => import("../components/hf/page/MyPage.vue")
        },
        {

            path: "/collect",
            redirect: "/collect/body"
        },
        {
            // 我的收藏
            path: "/collect",
            component: () => import("../components/hf/page/CollectPage.vue"),
            children: [
                {
                    path: "body",
                    // component: resolve => require(["../components/hf/CollectCom/collectBody.vue"], resolve)
                    component: () => import("../components/hf/CollectCom/collectBody.vue"),

                },
                {
                    path: "photo",
                    // component: resolve => require(["../components/hf/CollectCom/collectBody.vue"], resolve)
                    component: () => import("../components/hf/CollectCom/collectPhoto.vue"),

                },
                {
                    path: "video",
                    // component: resolve => require(["../components/hf/CollectCom/collectBody.vue"], resolve)
                    component: () => import("../components/hf/CollectCom/collectVideo.vue"),

                },
                {
                    path: "conver",
                    // component: resolve => require(["../components/hf/CollectCom/collectBody.vue"], resolve)
                    component: () => import("../components/hf/CollectCom/collectConver.vue"),

                },
                {
                    path: "form",
                    // component: resolve => require(["../components/hf/CollectCom/collectBody.vue"], resolve)
                    component: () => import("../components/hf/CollectCom/collectForm.vue"),

                },

            ]
        },
        {
            // 验证码登录
            path: "/loginCode",
            component: resolve => require(["../components/hf/page/LoginCodePage.vue"], resolve)
        },
        {
            // 账号密码登录
            path: "/loginUser",
            component: resolve => require(["../components/hf/page/LoginUserPwdPage.vue"], resolve)
        },
        {
            // 领金币
            path: "/getCoin",
            component: resolve => require(["../components/hf/page/getCoinPage.vue"], resolve)
        },
        {
            // 天天特卖
            path: "/everyday",
            component: reslove => require(["../components/hf/page/EveryDayPage.vue"], reslove)
        },
        {
            // 直播
            path: "/play",
            component: reslove => require(["../components/hf/page/DayPlayPage.vue"], reslove)
        },
        {
            // 土货鲜食
            path: "/localfood",
            component: reslove => require(["../components/hf/page/LocalFoodPage.vue"], reslove)
        },
        {
            // 红包签到
            path: "/hotbag",
            component: () => import("../components/hf/page/HotBagPage.vue")
        },
        // 罗书停
        {
            // 天猫
            path: "/TmallPage",
            redirect: "/TmallPage/newsPage1"
        },
        {
            path: "/TogetherPage",
            redirect: "/TogetherPage/Pages1"
        },
        {
            path: '/TmallPage',
            name: "TmallPage",
            component: resolve => require(['../components/lst/page/TmallPage.vue'], resolve),
            children: [
                {
                    path: "newsPage1",
                    component: resolve => require(['../components/lst/Tmall/news/newsPage1.vue'], resolve)
                },
                {
                    path: "newsPage2",
                    component: resolve => require(['../components/lst/Tmall/news/newsPage2.vue'], resolve)
                },
                {
                    path: "newsPage3",
                    component: resolve => require(['../components/lst/Tmall/news/newsPage3.vue'], resolve)
                },
                {
                    path: "newsPage4",
                    component: resolve => require(['../components/lst/Tmall/news/newsPage4.vue'], resolve)
                },
                {
                    path: "newsPage5",
                    component: resolve => require(['../components/lst/Tmall/news/newsPage5.vue'], resolve)
                },
            ]
        },
        {
            // 聚划算
            path: '/TogetherPage',
            name: "TogetherPage",
            component: resolve => require(['../components/lst/page/TogetherPage.vue'], resolve),
            children: [
                {
                    path: "pages1",
                    component: resolve => require(['../components/lst/Together/togetherPages/pages1'], resolve)
                },
                {
                    path: "pages2",
                    component: resolve => require(['../components/lst/Together/togetherPages/pages2'], resolve)
                },
                {
                    path: "pages3",
                    component: resolve => require(['../components/lst/Together/togetherPages/pages3'], resolve)
                },
                {
                    path: "pages4",
                    component: resolve => require(['../components/lst/Together/togetherPages/pages4'], resolve)
                },

            ]
        },
        // 去有好货页面
        {
            path: '/GoodsPage',
            name: "GoodsPage",
            component: resolve => require(['../components/lst/page/GoodsPage.vue'], resolve),
        },
        // 去客服聊天页面
        {
            path: '/CustomerPage',
            name: "CustomerPage",
            component: resolve => require(['../components/lst/page/CustomerPage.vue'], resolve),
        },
        //去阿里拍卖
        {
            path: '/AuctionPage',
            name: "AuctionPage",
            component: resolve => require(['../components/lst/page/AuctionPage.vue'], resolve),
        },
        //去天猫国际
        {
            path: '/InterPage',
            name: "InterPage",
            component: resolve => require(['../components/lst/page/InterPage.vue'], resolve),
            redirect: "/InterPage/Pages2",
            children: [
                {
                    path: "pages2",
                    component: resolve => require(['../components/lst/Together/togetherPages/pages2'], resolve)
                },
                {
                    path: "pages3",
                    component: resolve => require(['../components/lst/Together/togetherPages/pages3'], resolve)
                },
            ]
        },

        // 史瑶
        {
            path: "/zhu",
            component: resolve => require(['../components/sy/HomeCom/pagetwo/zhu.vue'], resolve)

        },
        {
            path: "/dian",
            component: resolve => require(['../components/sy/HomeCom/pagthree/dian.vue'], resolve)
        },
        {
            path: "/piao",
            component: resolve => require(['../components/sy/HomeCom/pagefour/piao.vue'], resolve)

        },
        {
            path: "/Page",
            component: resolve => require(['../components/sy/HomeCom/pagefive/Page.vue'], resolve)

        },
        {
            path: "/ding",
            component: resolve => require(['../components/sy/HomeCom/pagesix/ding.vue'], resolve)

        },

        // 刘旭东
        {
            // 主页搜索
            path: '/mysearch',
            component: () => import('../components/lxd/searchCom/mysearch.vue')
        },
        {
            // 天猫汽车
            path: '/tmcarPage',
            component: () => import('../components/lxd/tmcar/tmcarPage.vue')
        },
        {
            path: '/newcar',
            component: () => import('../components/lxd/tmcar/newcar/newcar.vue')
        },
        {
            path: '/fenlei',
            component: () => import('../components/lxd/tmcar/newcar/fenlei.vue')
        },
        {
            path: '/msCard',
            component: () => import('../components/lxd/msCard/msCard.vue')
        },
        {
            path: '/tpp',
            component: () => import('../components/lxd/tpp/tpp.vue')
        },
        {
            // 404 not fround
            path: '*',
            name: 'no',
            component: () => import("../components/hf/page/erro404.vue")
        }

    ],
    mode: "history"
})


export default router